
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import org.junit.Test;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.firefox.internal.ProfilesIni;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class uploadfile {

	@Test
	public void sample() throws InterruptedException{
		
	
	FirefoxDriver driver = new FirefoxDriver();
	driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
	driver.get("http://www.megafileupload.com/");
	driver.findElement(By.id("uploadfile_0")).sendKeys("C:\\Users\\home\\Desktop\\rwxcl.txt");
	driver.findElement(By.id("terms")).click();
	driver.findElement(By.name("send")).click();
	driver.quit();	
}
}
